<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"  %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"  %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"  %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"  %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"  %>

<html>
<head>
	<script type="text/javascript">
		$(document).ready(function() {
			
			// 수정
			$("#id_btn_edit").click(function(e) {
				e.preventDefault();
				if (confirm("변경된 권한을 적용 하시겠습니까?")) {
					$("#user").submit();
				}
			});
			
			// 취소
			$("#id_btn_cancel").click(function(e) {
				e.preventDefault();
				history.back();
			});
			
		});
	</script>
</head>
<body>
	<h3>운영진 정보 (${user.name}님)</h3>
	
	
	
	<form:form commandName="user" method="post">	
	<form:hidden path="id" />
	
	<fieldset class="tbl_type3 tbl_forms">  
	    <table cellspacing="0" border="1" summary="표에 관한 요약 정보">  
	   	<col width="150">    
    	<col>  
    	    	   	    
	    <tr>  
	    	<th>이름</th>
	    	<td><font color="green">${user.name}</font> ${user.id} (${user.nickname})</td>
	    </tr>	    	     	    
	    <tr>  
	    	<th>권한정보</th>
	    	<td>${user.roleGrpId} (${user.roleGrpNm})</td>
	    </tr>	    	     	    
	    <tr>
	    	<th>TEAM</th>
	    	<td>${user.userTeam.teamCd} (${user.userTeam.teamNm})</td>
	    </tr> 
	    <tr>
	    	<th>화면에 표시될 직책</th>
	    	<td>
	    		<form:input path="userTeam.posDesc" cssClass="input_txt" style="width:200px" />
	    	</td>
	    </tr> 
	    <tr>
	    	<th>하고 싶은 말</th>
	    	<td>
	    		<textarea id="userTeam.intro" name="userTeam.intro" style="width:100%;height:200px">${user.userTeam.intro}</textarea>
	    	</td>
	    </tr> 
		<tr>  
		    <th><img src="/member/thumbnail/download/EXT/0000/FILE/${user.id}" width="120"></th>  
		    <td style="text-align:left;">
		    	<c:if test="${!empty user.userHistoryList}">
		    	<c:forEach items="${user.userHistoryList}" var="userHistory" varStatus="j">
		    		<c:if test="${0 < j.index}"><br></c:if>
		    		&nbsp;-&nbsp;${userHistory.hist}
		    	</c:forEach>
		    	</c:if>
		    </td>  
		</tr>  	
	     	
	    </table>  
	</fieldset> 
	
	</form:form>
	
	
	<br><br>
	
	<div style="text-align:center;">
		<a href="#" id="id_btn_edit" class="btn_big"><strong>정보 변경</strong></a>
		<a href="#" id="id_btn_cancel" class="btn_big"><span>취소</span></a> 
	</div>
	
	<br><br><br>
	
	

</body>
</html>















